// PARADIME INTERPRETER
//
//LICENSED FREELY UNDER MIT.
//CREATED FOR FREE USE.
#ifndef EXPLOR_VARDOMAIN
#define EXPLOR_VARDOMAIN

//Operating States.
#define VARDOM_READY 1
#define VARDOM_FAULT 0

#include "variant.h"
#include "Interpreter.h"

class VariableDomain
{
public:

	VariableDomain(Interpreter* PInterpreter, VariableDomain* ParentDomain);//Constructor
	void Assign(std::string input, Variant* var);		//Set a variable
	Variant* Lookup(std::string name);					//Get a variable
	void COUTdump(void);

private:
	int State;				   //Operating state of the domain.
	Interpreter* PInterpreter; //Pointer to the interpreter that owns this domain.
	std::map<std::string,Variant*> Variabletable;

	VariableDomain* ParentDomain;
	bool AllowRecursiveLookups;

};

#endif
